package com.logback.controller;

import com.logback.basic.ResponseData;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author chenfoxin
 * @Description TODO
 * @Date 2022/6/2 9:37
 **/
@RestController
@RequestMapping("/logBackMockController")
public class LogBackMockController {
    private Logger logger = LoggerFactory.getLogger(getClass());

    @GetMapping("/mockLog")
    public ResponseData mockLog(){
        logger.info("mockLog");
        ResponseData<String> responseData = new ResponseData<>();
        responseData.setData("success").ok();
        return responseData;
    }
}
